<template>
	<f7-page navbar-fixed id="usecar" data-page='usecar' class="usecar">
		<f7-navbar v-if="$theme.ios">
			<f7-nav-left sliding>
				<div class="left">
					<a class="back" href="#">
						<i class="iconfont icon-zuo"></i>
					</a>
				</div>
			</f7-nav-left>
			<f7-nav-center sliding>公务用车</f7-nav-center>
			<f7-nav-right>
			</f7-nav-right>
		</f7-navbar>

		<f7-list form>
			<f7-list-item>
    			<f7-label>用车事由</f7-label>
    			<f7-input type="text" placeholder="请输入出差事由"/>
  			</f7-list-item>
  		</f7-list>
		<div class="list-block l-c-margin">
			<ul>
				<li>
					<div class="item-content">
						<div class="item-inner">
							<div class="item-title label">开始时间</div>
							<div class="item-input clearfix">
        						<input class="left" type="text" placeholder="请选择(必填)" readonly id="beginTime">
    						</div>
				        </div>
				    </div>
				</li>
				<li>
					<div class="item-content">
						<div class="item-inner">
							<div class="item-title label">结束时间</div>
							<div class="item-input clearfix">
        						<input class="left" type="text" placeholder="请选择(必填)" readonly id="endTime">
    						</div>
				        </div>
				    </div>
				</li>
				<li>
					<div class="item-content">
						<div class="item-inner">
							<div class="item-title label">时长</div>
							<div class="item-input clearfix">
        						<input class="left" type="text" placeholder="请输入时间(必填)">
    						</div>
				        </div>
				    </div>
				</li>
			</ul>
		</div>
		<f7-list form>
			<f7-list-item>
    			<f7-label>备注</f7-label>
    			<f7-input type="textarea" placeholder="请输入用车事由(必填)"></f7-input>
  			</f7-list-item>
		</f7-list>
		<div class="l-c-nameselect">
			<div class="l-c-n-title">审批人</div>
			<ul class="l-c-n-namenav clearfix">
				<li class="left"><a href="/namechoise/"><div><i class="icon iconfont icon-wodedangxuan"></i></div><span class="choisename">姓名</span></a></li>
				<li class="left next"><i class="icon iconfont icon-iconfontjiantou"></i></li>
				<li class="left waitechoise"><a href="/namechoise/"><div><i class="icon iconfont icon-jia"></i></div></a></li>
			</ul>
		</div>

	</f7-page>

</template>

<script>
	import InitPage from '../components/PageInit.vue';
	export default {
		data: function() {
			return {
			}
		},
		mounted: function(){
			this.init();
		},
		methods: {
			init: function(){
				/*this.$ajax.aboutOur().then(res => {

				});*/
				this.timeInit();
				this.pk();
			},
			timeInit: function(){
				let now = new Date();
				InitPage.TimeInit('#beginTime', this,[new Date().setMonth(now.getMonth() - 1)]);
				InitPage.TimeInit('#endTime', this,[now]);
			},
			pk:function(){
				var app = new Framework7();
				var myPicker = app.picker({
				    input: '#picker-type',
				    cols: [
				       {
				         values: ['病假', '调休', '事假']
				       }
				     ]
				});
			},
		}
	}
</script>